package org.mili.ticketeer.dto;

/**
 */
public enum SexEnum {

    MALE,
    FEMALE;

    public String getCode() {
        return name().substring(0, 1);
    }

    public static SexEnum fromCode(String code) {
        return code.toLowerCase().equals("m") ? SexEnum.MALE : SexEnum.FEMALE;
    }
}
